<h2><?= $this->translate('Listing categories');?></h2>
<div class="grid_12"><?= $this->flashMessenger(); ?></div>
<div class="clearfix"></div>
<p><a href="<?= $this->url(array(), 'news_category_create'); ?>"><?= $this->translate('Create a new category');?></a></p>
<div class="grid_12 alpha omega">
	<table width="100%">
		<thead>
			<tr>
				<th><?= $this->translate('ID');?></th>
				<th><?= $this->translate('Name');?></th>
				<th><?= $this->translate('Published');?></th>
				<th><?= $this->translate('Actions');?></th>
			</tr>
		</thead>
		<tbody>
			<?php if($this->categories->count() > 0):?>
				<?php foreach ($this->categories as $category):?>
					<tr>
						<td align="center">
							<?= $category->id;?>
						</td>
						<td>
							<?= $category->name;?>
						</td>
						<td align="center">
							<?= $category->published;?>
						</td>
						<td>
							<a href="<?= $this->url(array('id' => $category->id), 'news_category_update');?>">
								<?= $this->translate('Edit');?>
							</a>&nbsp;|&nbsp;
							<a href="<?= $this->url(array('id' => $category->id), 'news_category_delete');?>" onclick="return confirm('<?= $this->translate('Are you shoore?');?>');">
								<?= $this->translate('Delete');?>
							</a>
						</td>
					</tr>
				<?php endforeach;?>
			<?php else: ?>
				<tr>
					<td colspan="4">
						<?= $this->translate('No items news');?>
					</td>
				</tr>
			<?php endif; ?>
		</tbody>
	</table>
</div>